<template id="footer">
	<div class="footer_router">

		<ul>
			<li @click="HeightL(0)">
				<router-link to="/about_class">
					<img v-if="index=='1'||index=='2'" src="../assets/images/footer_icon/yueke_gray.png" />
					<img v-if="index=='0'" src="../assets/images/footer_icon/yueke_green.png" />
					<p>约课</p>
				</router-link>
			</li>
			<!--<li @click="HeightL(1)">
				<router-link to="/collage">
					<img v-if="index=='0'||index=='2'" src="../assets/images/footer_icon/dingdan_gray.png"/>
					<img v-if="index=='1'" src="../assets/images/footer_icon/dingdan_green.png"/>
					<p>拼团</p>
				</router-link>
			</li>-->
			<li @click="HeightL(2)"  @click.stop="userAdd">
				<router-link to="/main">
					<img v-if="index=='1'||index=='0'" src="../assets/images/footer_icon/me_gray.png" />
					<img v-if="index=='2'" src="../assets/images/footer_icon/me_green.png" />

					<p>我的</p>
				</router-link>
			</li>
		</ul>

	</div>
</template>

<script>
	export default {
		data() {
			return {
				index: '0',
				sessionid:'',

			}
		},

		methods: {
			HeightL: function(index) {
				this.index = index
			},
			userAdd() {
				//let SESSION_ID = JSON.parse(window.sessionStorage.getItem('SESSION_ID'));
				var SESSION_ID=JSON.parse(window.localStorage.getItem('sessiond'))
				if(SESSION_ID == null){
					// this.$router.push({
					// 	path:'/forgot_password',
						
					// })
						var main
						this.$router.push({
						path: "/forgot_password",
						query:{
							main:'main'
						}
					})
				}else{
				this.$router.push({
						path:'/main'
					})	
				}
			}
		}
	}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style>
	@import "../assets/css/footer_router.css";
	.router-link-active {
		color: #2D8F90;
	}
</style>